<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>秘密花园</title>
<link rel="stylesheet" type="text/css" href="control.css"/>
<link rel="stylesheet" type="text/css" href="control_main.css" />
<script type="text/javascript">
function searchInfo(){
	clearUlInner();
	var userName = document.getElementById("un").value;
	var uploadTime = document.getElementById("ul").value;
	var url = "/networkforum/control/control_picture.do";
	
	var myajax = getByAjax();
	myajax.init(null,"get",true);
	myajax.get(url+"?index=0&size=10&userName="+encodeURIComponent(userName)+
		"&uploadTime="+uploadTime,function(d){
		var data = toJson(d);
		//page.view('articleInner',article,articleOption);
		page.view("rightUlInner",data,pictureOption);
		window.parent.iFrameHeight();
	});
	myajax = null;
}
var pictureOption = {
	userName:{
		param:{id:"userName"},
		bind:{userId:"userId"},
		style:{color:"blue"}
	},
	userSex:{
		param:{id:"userSex"}
	},
	userAge:{
		param:{id:"userAge"},
	},
	userPlace:{
		param:{id:"userPlace"},
	},
	registerTime:{
		param:{id:"registerTime"},
	},
	lastLoginTime:{
		param:{id:"lastLoginTime"},
	},
	userState:{
		param:{id:"userState"},
	},
	userRole:{
		param:{id:"userRole"}
	},
}
function userHandle(event){
	event = event || window.event;
	var target = event.target || event.srcElement;
	var handle = document.getElementById("handle");
	target.parentElement.appendChild(handle.cloneNode(true));
	var option = {
			'name':{
				'param':{'id':"typeName"}
			}
		};
	var param = {
			'data':[{'name':"美女"},{'name':"性感"}],
			'target':target,
		};
	page.combo("type",param,option);
}
function createGroup(){
	var ul = document.getElementById("rightUlInner");
	var module = document.getElementById("module");
	var newLi = module.cloneNode(true);
	newLi.style.display = "";
	ul.appendChild(newLi);	
}
function deleteItem(){
	var items = document.getElementsByClassName("checkBox");
	var ul = document.getElementById("rightUlInner");
	var len = items.length;
	for(var i =len-1;i>0;i--){
		var ite = items[i];
		if(ite.checked){
			ul.removeChild(ite.parentElement);
		}	
	}
}
</script>
</head>

<body>
    <div id="rightNav">
        <span onclick="createGroup();" style="display:inline-block;padding:3px 30px;border-radius:5px;border:1px solid #ccc;margin-top:3px;cursor:pointer;">创建</span>
        <span onclick="deleteItem();" style="display:inline-block;padding:3px 30px;border-radius:5px;border:1px solid #ccc;margin-top:3px;cursor:pointer;">删除</span>
    </div>
    <div id="userCenter" class="rightCenter">
        <ul id="rightUlInner" class="rightUlInner">
            <li id="module" style="display:none;">
                <input class="checkBox" type="checkbox" style="width:5%;margin-right:4px;"/>
                <input style="width:50%;text-align:left;"></input>
                <span style="width:20%;"></span>
                <span style="width:20%;"></span> 
            </li>
            <li id="header">
                <span style="width:5%;">全部</span>
                <span style="width:50%;text-align:left;">组名</span>
                <span style="width:20%;">图片数量</span>
                <span style="width:20%;">状态</span>
            </li>
            <li style="">
                <input type="checkbox" style="width:5%;margin-right:4px;"/>
                <input style="width:50%;border:none;text-align:left;"></input>
                <span style="width:20%;">图片数量</span>
                <span style="width:20%;">状态</span> 
            </li>
        </ul>
     </div>
     <span onclick="deleteItem();" style="display:inline-block;padding:3px 30px;border-radius:5px;border:1px solid #ccc;margin-top:50px;cursor:pointer;">保存</span>
</body>
<script type="text/javascript" src="control_main.js"></script>
<script src="../js/view.js" type="text/javascript"></script>
<script src="../js/combo.js" type="text/javascript"></script>
<script src="../js/myajax.js" type="text/javascript"></script>
<script src="../js/pageing.js" type="text/javascript"></script>
</html>
